package com.outdd.vaietool.common.utils.io;

import lombok.extern.slf4j.Slf4j;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

/**
 * @program: 流转换工具
 * @description:
 * @author: VAIE
 * @create: 2021-05-13 11:57
 **/
@Slf4j
public class IoConvertUtil {

    /**
     * 文件转换输入流
     * @param file
     * @return
     */
    public static InputStream fileConvertInputStream(File file){
        InputStream inputStream = null;
        try {
            inputStream = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            log.error("转换失败",e);
        }
        return inputStream;
    }
}
